/*!
 * @file simd_test.cpp
 *
 * @author Andrzej Ciarkowski <mailto:andrzej.ciarkowski@gmail.com>
 */
#include "simd_test.h"

#include <dsp++/simd.h>
#include <dsp++/vectmath.h>
#include <dsp++/float.h>
#include <dsp++/norm.h>
#include "execution_timer.h"

using namespace dsp::test;

const size_t N = 1024;
const float DSP_ALIGNED(16) a[] = {0.0519835390150547027587891,0.0983107760548591613769531,-1.43392241001129150390625,0.468489587306976318359375,0.3444426059722900390625,0.490921586751937866210938,-0.413305729627609252929688,0.0346787385642528533935547,-0.0848314315080642700195312,0.62817156314849853515625,0.127602145075798034667969,-0.7727935314178466796875,1.431363582611083984375,-1.2295396327972412109375,-1.38972628116607666015625,-1.17881858348846435546875,-1.4060056209564208984375,-1.097560882568359375,0.0806045085191726684570312,1.8615539073944091796875,-0.34088838100433349609375,1.669760227203369140625,-0.29529631137847900390625,0.151921659708023071289062,2.01970577239990234375,0.338179677724838256835938,1.4398021697998046875,-0.388313859701156616210938,-1.472661495208740234375,-0.584733664989471435546875,0.596652984619140625,-2.15467071533203125,0.100025385618209838867188,-0.425098240375518798828125,0.000424166093580424785614014,-0.90946805477142333984375,-0.844160020351409912109375,0.205709442496299743652344,1.11414015293121337890625,0.191271215677261352539062,0.89698314666748046875,0.917069911956787109375,-0.87563097476959228515625,-0.72571408748626708984375,0.8929107189178466796875,-0.397684007883071899414062,0.00486457487568259239196777,-0.959506511688232421875,-1.734462261199951171875,1.1477367877960205078125,-0.175794988870620727539062,-1.48741471767425537109375,-0.903969705104827880859375,0.75055217742919921875,-0.0347129963338375091552734,0.454735279083251953125,-1.0018589496612548828125,-0.906838834285736083984375,-0.91524469852447509765625,0.983295023441314697265625,2.195284366607666015625,0.485093533992767333984375,-0.6695702075958251953125,-0.225742131471633911132812,0.253088027238845825195312,-0.414076268672943115234375,-2.2193605899810791015625,0.142802193760871887207031,-1.3418014049530029296875,1.38122951984405517578125,0.356077492237091064453125,0.964861392974853515625,-1.0345160961151123046875,-1.16839230060577392578125,0.348437696695327758789062,-1.015879154205322265625,0.9454171657562255859375,0.110665537416934967041016,-0.8965227603912353515625,0.013499108143150806427002,0.66532266139984130859375,-0.586069524288177490234375,-0.663049280643463134765625,1.94110929965972900390625,-0.282924979925155639648438,-0.489227771759033203125,0.778746068477630615234375,-0.991149485111236572265625,-0.957114756107330322265625,1.75152790546417236328125,0.3698732852935791015625,-0.994955003261566162109375,1.27542245388031005859375,0.8425314426422119140625,-1.99918472766876220703125,-0.638518273830413818359375,-0.624772131443023681640625,1.48423445224761962890625,1.59912478923797607421875,1.04370415210723876953125,0.0354072228074073791503906,0.342545598745346069335938,-0.0726161524653434753417969,-2.7476279735565185546875,-0.753986835479736328125,1.232922077178955078125,-2.498858928680419921875,1.41528403759002685546875,0.000374746305169537663459778,0.283460825681686401367188,0.387970745563507080078125,-0.00377467391081154346466064,1.0898435115814208984375,-0.344244986772537231445312,-0.532878458499908447265625,-1.61131227016448974609375,0.262129127979278564453125,1.4945774078369140625,-0.1275198459625244140625,-1.48781192302703857421875,-0.160379678010940551757812,1.47996008396148681640625,-0.497648924589157104492188,0.0136702433228492736816406,-1.318931102752685546875,0.0383985042572021484375,-0.36704528331756591796875,-0.273127287626266479492188,0.118014983832836151123047,-0.78582274913787841796875,0.26088225841522216796875,0.00989283062517642974853516,-1.0550615787506103515625,-0.82806313037872314453125,-1.08970081806182861328125,0.325428158044815063476562,-1.65573108196258544921875,0.67952382564544677734375,-1.5794589519500732421875,-0.896226346492767333984375,0.564834535121917724609375,0.441808253526687622070312,1.86370241641998291015625,-0.200015261769294738769531,-0.701186835765838623046875,0.960499227046966552734375,-2.105144977569580078125,0.204875573515892028808594,0.902800858020782470703125,-0.895418226718902587890625,0.92526376247406005859375,0.746282875537872314453125,-0.256231844425201416015625,-0.179044157266616821289062,0.736645221710205078125,0.957998752593994140625,0.250259101390838623046875,1.19547307491302490234375,0.745553195476531982421875,0.720254600048065185546875,-1.27558887004852294921875,0.16838836669921875,1.15603351593017578125,-1.37322294712066650390625,0.431607097387313842773438,-0.2302496433258056640625,-0.557229936122894287109375,1.99923610687255859375,1.1392323970794677734375,1.25498068332672119140625,0.931541979312896728515625,-0.82950627803802490234375,-0.587544262409210205078125,0.75171363353729248046875,-0.218231663107872009277344,-1.909742832183837890625,-0.294979721307754516601562,-0.98931157588958740234375,-2.2981040477752685546875,0.60292541980743408203125,0.7019345760345458984375,0.464262783527374267578125,0.0260195359587669372558594,1.083919048309326171875,0.644237041473388671875,-1.94543588161468505859375,1.04012644290924072265625,-1.50448811054229736328125,1.00695049762725830078125,-0.185456305742263793945312,-0.50279390811920166015625,-0.480185329914093017578125,0.974519789218902587890625,0.7611463069915771484375,0.501329720020294189453125,-0.191234901547431945800781,-1.02636015415191650390625,-0.3948705196380615234375,-0.195910587906837463378906,0.83296239376068115234375,-0.6595199108123779296875,-1.38498783111572265625,1.6007688045501708984375,0.481887131929397583007812,-0.8790910243988037109375,1.2561798095703125,1.59590244293212890625,1.388375759124755859375,0.501272261142730712890625,1.55631077289581298828125,-1.17219257354736328125,1.843996524810791015625,1.02105629444122314453125,-0.206906273961067199707031,1.89772832393646240234375,-1.0355322360992431640625,1.45216619968414306640625,0.339065730571746826171875,0.864633977413177490234375,0.0702400282025337219238281,-0.211273401975631713867188,1.06923663616180419921875,-1.5412895679473876953125,-0.481734454631805419921875,-0.666445672512054443359375,-0.0967006683349609375,-0.88742983341217041015625,0.354755491018295288085938,-1.05872058868408203125,-0.310961633920669555664062,-0.180336043238639831542969,1.2638576030731201171875,1.3571903705596923828125,1.10826432704925537109375,-0.431782692670822143554688,0.6468346118927001953125,-0.388741821050643920898438,-0.0215326976031064987182617,-0.0874161943793296813964844,1.5266811847686767578125,-0.521002292633056640625,0.668087661266326904296875,1.63782274723052978515625,0.677146017551422119140625,2.8127467632293701171875,-0.141328200697898864746094,0.920926153659820556640625,-0.0304565839469432830810547,0.40521633625030517578125,0.629320323467254638671875,-0.727176249027252197265625,0.324609279632568359375,0.333916634321212768554688,1.04137766361236572265625,-0.325356006622314453125,-2.034451961517333984375,-0.0210760105401277542114258,0.630379199981689453125,0.332539081573486328125,1.07985532283782958984375,0.697901546955108642578125,-0.0332117751240730285644531,-0.145651593804359436035156,0.0894334465265274047851562,-0.352666676044464111328125,0.520996570587158203125,-0.84587466716766357421875,-0.0951519086956977844238281,-0.0849485322833061218261719,1.84478700160980224609375,0.790941894054412841796875,-1.58352410793304443359375,1.1526043415069580078125,0.6201789379119873046875,-0.92104089260101318359375,-0.4999058246612548828125,-0.185297951102256774902344,-0.8666095733642578125,-0.596571147441864013671875,0.121147602796554565429688,-1.0854613780975341796875,0.114814691245555877685547,-1.0562627315521240234375,-0.29779183864593505859375,0.396242678165435791015625,-0.124624863266944885253906,-1.29888474941253662109375,-0.40105259418487548828125,-0.610598027706146240234375,0.8419363498687744140625,0.285728007555007934570312,-1.20487511157989501953125,2.01991939544677734375,0.539350688457489013671875,-0.8506343364715576171875,-1.592098236083984375,-0.695016086101531982421875,-1.0352528095245361328125,0.581140816211700439453125,0.89915430545806884765625,-0.07891547679901123046875,-0.638698041439056396484375,0.422191441059112548828125,0.396646708250045776367188,-0.420790404081344604492188,-1.00611913204193115234375,0.0654262602329254150390625,-1.07182562351226806640625,0.697381496429443359375,0.626608371734619140625,2.0859444141387939453125,0.949481666088104248046875,0.406155079603195190429688,-0.36944806575775146484375,0.639667510986328125,1.3363208770751953125,0.51238155364990234375,0.50877749919891357421875,-0.194369360804557800292969,1.55211532115936279296875,-0.760924279689788818359375,-0.78639984130859375,-1.78847873210906982421875,-0.33775150775909423828125,1.070838451385498046875,-0.94927465915679931640625,-2.118378162384033203125,-1.64044249057769775390625,-1.1730747222900390625,0.0792027041316032409667969,-0.705684006214141845703125,0.710921347141265869140625,-0.987967789173126220703125,0.329774707555770874023438,1.15571749210357666015625,-0.126489177346229553222656,-0.396379202604293823242188,-0.29049777984619140625,2.22977542877197265625,-1.076260089874267578125,-1.26988685131072998046875,-0.3282439708709716796875,-0.217612966895103454589844,0.304466307163238525390625,-0.63756215572357177734375,-0.675750255584716796875,-0.786223590373992919921875,2.2243974208831787109375,0.857707202434539794921875,-0.387319296598434448242188,2.9203898906707763671875,0.459517806768417358398438,-0.84974956512451171875,0.0914294198155403137207031,1.359736919403076171875,-0.411399304866790771484375,-1.96276628971099853515625,0.723827838897705078125,-0.376613616943359375,-0.57938158512115478515625,1.017729282379150390625,-1.53167998790740966796875,0.0963650271296501159667969,0.3730428218841552734375,0.92862987518310546875,0.160315021872520446777344,0.27119433879852294921875,-0.6378281116485595703125,-0.3515369892120361328125,-0.443396061658859252929688,-0.274372607469558715820312,-0.599173843860626220703125,-1.25939524173736572265625,-0.209488973021507263183594,0.213797375559806823730469,-1.41940748691558837890625,-0.0277021378278732299804688,-0.70795238018035888671875,1.9437587261199951171875,0.66075193881988525390625,0.48991811275482177734375,-0.0624178536236286163330078,0.195382088422775268554688,0.85976445674896240234375,-0.85903775691986083984375,2.4452092647552490234375,1.74247086048126220703125,0.390587329864501953125,-0.6956522464752197265625,1.03464925289154052734375,0.912684917449951171875,0.19937813282012939453125,0.19666194915771484375,0.486054450273513793945312,-1.74422395229339599609375,1.0517003536224365234375,-0.558723866939544677734375,-0.0442780293524265289306641,-1.36898791790008544921875,-0.0994589403271675109863281,-0.71665370464324951171875,-1.07519137859344482421875,0.99267184734344482421875,0.17834842205047607421875,1.29817831516265869140625,0.7434322834014892578125,0.246084660291671752929688,2.0226209163665771484375,0.8836591243743896484375,-0.0912036970257759094238281,-0.283052653074264526367188,-0.53889858722686767578125,0.495249927043914794921875,-0.228666394948959350585938,-0.0397722274065017700195312,-0.102166883647441864013672,-1.374244213104248046875,1.15007603168487548828125,-1.73235309123992919921875,0.849911510944366455078125,1.4128844738006591796875,-0.726764202117919921875,0.264403611421585083007812,-2.618000507354736328125,-1.63510036468505859375,-1.35966908931732177734375,1.55695641040802001953125,0.141924038529396057128906,-0.62679421901702880859375,-0.75568258762359619140625,-0.71304047107696533203125,0.47250080108642578125,-0.584750473499298095703125,0.689541637897491455078125,-0.799614012241363525390625,-1.653382778167724609375,1.224357128143310546875,-0.6928012371063232421875,1.22363376617431640625,-0.3869607448577880859375,-0.788545787334442138671875,0.897513687610626220703125,-0.0750811547040939331054688,1.46356070041656494140625,-0.386349111795425415039062,0.618223667144775390625,-0.89328861236572265625,-0.0572190061211585998535156,1.864572048187255859375,-0.491529911756515502929688,0.430232375860214233398438,0.960358798503875732421875,-0.478244930505752563476562,-1.4917171001434326171875,1.95050144195556640625,-0.0487393401563167572021484,1.09367477893829345703125,-0.192465692758560180664062,-0.76481735706329345703125,-0.353751480579376220703125,0.874460279941558837890625,-0.791256964206695556640625,0.41179525852203369140625,-0.376953572034835815429688,-0.330326735973358154296875,0.99876487255096435546875,-0.817412853240966796875,2.1037533283233642578125,-0.0601274184882640838623047,0.995851993560791015625,-1.1838810443878173828125,-0.602940499782562255859375,0.0997601598501205444335938,0.46484363079071044921875,0.169791132211685180664062,0.465682804584503173828125,1.38770580291748046875,-0.40673339366912841796875,-0.110449440777301788330078,0.419968932867050170898438,-0.98140609264373779296875,0.04321765899658203125,-1.4496901035308837890625,0.379643470048904418945312,0.744178235530853271484375,0.513360440731048583984375,1.1962559223175048828125,0.164304867386817932128906,-1.85561907291412353515625,0.581699848175048828125,0.394888192415237426757812,-0.81281411647796630859375,-0.390700310468673706054688,0.23245108127593994140625,0.641355693340301513671875,-0.0959349796175956726074219,0.436242640018463134765625,-0.138302341103553771972656,-0.396141350269317626953125,-1.68806934356689453125,1.9913780689239501953125,-0.681494891643524169921875,-1.43433201313018798828125,-0.685668528079986572265625,-0.6405999660491943359375,-2.1721346378326416015625,-0.0505770370364189147949219,0.6407487392425537109375,0.210774019360542297363281,-0.71236646175384521484375,0.3747556209564208984375,2.938976287841796875,-1.58977258205413818359375,-0.106171451508998870849609,-0.909269630908966064453125,0.494044452905654907226562,-1.34834563732147216796875,0.317028522491455078125,0.34807240962982177734375,-0.00897968281060457229614258,3.0420777797698974609375,0.403895914554595947265625,1.51238000392913818359375,0.198499664664268493652344,2.5790922641754150390625,-0.318128079175949096679688,2.6793506145477294921875,0.4561984539031982421875,0.102019675076007843017578,-0.495238333940505981445312,-0.731393992900848388671875,0.0292218625545501708984375,-0.0224111713469028472900391,0.50404751300811767578125,-0.376214057207107543945312,0.0425296910107135772705078,-0.754967153072357177734375,-1.264842510223388671875,0.374993711709976196289062,1.8829596042633056640625,-0.365152299404144287109375,-0.594353377819061279296875,1.6527879238128662109375,0.311750739812850952148438,0.125697553157806396484375,-0.135308325290679931640625,-0.640606224536895751953125,-1.15316450595855712890625,-0.857982099056243896484375,-0.833003342151641845703125,-1.78974044322967529296875,0.252029240131378173828125,-0.206956163048744201660156,0.95052731037139892578125,0.0340504720807075500488281,-0.305252552032470703125,-0.115045420825481414794922,0.74177300930023193359375,2.16544818878173828125,0.426089972257614135742188,-0.52207553386688232421875,0.364248573780059814453125,0.929060041904449462890625,-1.66453707218170166015625,-0.176622897386550903320312,0.391553699970245361328125,2.3274013996124267578125,-0.104184873402118682861328,1.71366012096405029296875,0.0918681398034095764160156,-0.385411083698272705078125,-0.0108497487381100654602051,1.22004878520965576171875,-0.419241696596145629882812,0.7083618640899658203125,0.856999933719635009765625,-1.2128317356109619140625,-2.3619825839996337890625,-1.28142058849334716796875,0.688478648662567138671875,2.1333789825439453125,-1.59512889385223388671875,1.5870358943939208984375,-0.15758955478668212890625,1.20882761478424072265625,1.44023191928863525390625,-1.717992305755615234375,-1.7476236820220947265625,0.358185619115829467773438,0.798908412456512451171875,2.597783565521240234375,0.822399318218231201171875,0.374572902917861938476562,-0.206175401806831359863281,0.449623376131057739257812,-0.595381677150726318359375,-0.0859704092144966125488281,0.774708211421966552734375,1.21437418460845947265625,-2.5500843524932861328125,0.59465062618255615234375,0.216644927859306335449219,-1.2277696132659912109375,-0.866610825061798095703125,1.38068974018096923828125,-0.4364612102508544921875,-2.44091033935546875,-1.0313737392425537109375,-0.70303857326507568359375,-1.00459384918212890625,-0.8991158008575439453125,-0.318546622991561889648438,0.0574690550565719604492188,1.218738079071044921875,1.13424217700958251953125,0.55823552608489990234375,1.4843728542327880859375,-1.165869235992431640625,0.157932072877883911132812,0.249890863895416259765625,-0.889984428882598876953125,0.449651271104812622070312,-1.7262136936187744140625,0.62525999546051025390625,-0.122782729566097259521484,-0.9775264263153076171875,1.77216231822967529296875,0.5582172870635986328125,-2.8010151386260986328125,0.81650292873382568359375,0.0515303350985050201416016,-1.81765830516815185546875,0.90275752544403076171875,-0.823292076587677001953125,-0.0899871066212654113769531,2.051399707794189453125,0.00744403479620814323425293,-0.718512594699859619140625,0.446070998907089233398438,0.80366790294647216796875,-0.76612758636474609375,-0.448332458734512329101562,0.100149922072887420654297,0.186814859509468078613281,0.0411143675446510314941406,-0.46078777313232421875,0.248321160674095153808594,1.27772033214569091796875,0.0171694401651620864868164,0.0399580374360084533691406,-1.13245677947998046875,-1.0127506256103515625,-2.4218599796295166015625,0.804340898990631103515625,0.273365467786788940429688,0.959589421749114990234375,-0.893348395824432373046875,0.760445892810821533203125,-0.355847269296646118164062,-0.337520122528076171875,-1.592801570892333984375,-0.566532194614410400390625,0.683292806148529052734375,0.387563645839691162109375,0.231586232781410217285156,0.159246623516082763671875,-0.221633404493331909179688,-0.240651607513427734375,0.473654776811599731445312,-0.75406682491302490234375,0.8990099430084228515625,-0.370528757572174072265625,1.036548137664794921875,-0.407069742679595947265625,-1.0113527774810791015625,-0.0597905293107032775878906,0.753360807895660400390625,0.318924844264984130859375,0.61546933650970458984375,0.7821972370147705078125,0.198016628623008728027344,-0.345615535974502563476562,-0.538987696170806884765625,0.430950582027435302734375,-0.516352832317352294921875,-1.16878974437713623046875,-0.667733013629913330078125,0.664457023143768310546875,0.204991057515144348144531,1.69911420345306396484375,-0.60503232479095458984375,0.206737965345382690429688,-1.28734338283538818359375,0.383506029844284057617188,-0.102590762078762054443359,-1.5122163295745849609375,0.9613780975341796875,0.19407093524932861328125,-0.379711598157882690429688,0.77807986736297607421875,-0.7379894256591796875,0.0851343721151351928710938,0.464268594980239868164062,-1.102725505828857421875,0.979728400707244873046875,0.63887310028076171875,0.812085688114166259765625,-0.78660929203033447265625,-0.70835649967193603515625,0.403288692235946655273438,-0.655162274837493896484375,-0.608103692531585693359375,0.390182226896286010742188,-1.2198932170867919921875,-0.253959476947784423828125,-1.10599911212921142578125,1.3664848804473876953125,-0.314751893281936645507812,-0.194645598530769348144531,-0.0273797456175088882446289,0.80881023406982421875,-1.29363524913787841796875,1.07745230197906494140625,0.79891121387481689453125,-0.396449387073516845703125,1.01347446441650390625,0.70404517650604248046875,-0.225839957594871520996094,0.584231555461883544921875,-0.00196504499763250350952148,-2.7034952640533447265625,-0.812623083591461181640625,0.561994016170501708984375,-0.918159902095794677734375,0.462727963924407958984375,-1.049610137939453125,0.274612963199615478515625,-0.395863145589828491210938,0.220168322324752807617188,-0.567365705966949462890625,2.1285030841827392578125,-0.00891020055860280990600586,1.1723301410675048828125,-0.572691500186920166015625,-0.5348856449127197265625,-0.517373979091644287109375,-0.747474849224090576171875,-0.729293644428253173828125,0.0519539155066013336181641,-0.319065898656845092773438,-1.59721982479095458984375,-0.30240237712860107421875,-0.338627874851226806640625,-0.645132482051849365234375,1.9321019649505615234375,1.3648917675018310546875,0.66296660900115966796875,1.130207061767578125,0.124289788305759429931641,-0.682977855205535888671875,-0.330551654100418090820312,-0.874837338924407958984375,-1.61127948760986328125,1.9929811954498291015625,0.67502915859222412109375,-0.0411258041858673095703125,0.54319703578948974609375,-0.16144430637359619140625,0.475778549909591674804688,-1.027292728424072265625,0.242342486977577209472656,-0.7691981792449951171875,-0.85003817081451416015625,-0.376206219196319580078125,0.911843001842498779296875,0.709688007831573486328125,-1.25843775272369384765625,-0.490723043680191040039062,2.6628048419952392578125,1.0413143634796142578125,-0.238854244351387023925781,-0.426219195127487182617188,-0.0154165457934141159057617,-0.0451898686587810516357422,-0.705159366130828857421875,-0.0359417721629142761230469,2.69673442840576171875,0.95148408412933349609375,0.9166948795318603515625,-1.48292648792266845703125,1.1724321842193603515625,2.1092331409454345703125,1.1927196979522705078125,-0.361030250787734985351562,0.485987722873687744140625,-1.2639005184173583984375,-0.72189617156982421875,-0.86512792110443115234375,1.40160882472991943359375,0.562043368816375732421875,-0.283090144395828247070312,0.561218678951263427734375,-2.0417897701263427734375,0.948870837688446044921875,1.71542298793792724609375,1.81778049468994140625,0.080534875392913818359375,-1.25408685207366943359375,-0.154917314648628234863281,-1.97373676300048828125,-0.649407565593719482421875,0.398751318454742431640625,0.92525923252105712890625,-0.6941394805908203125,-0.635655105113983154296875,1.701057910919189453125,0.626721084117889404296875,0.00339291337877511978149414,0.743563234806060791015625,-0.765115559101104736328125,0.265217721462249755859375,0.7229688167572021484375,0.277557462453842163085938,-0.472627073526382446289062,0.724147021770477294921875,0.45654773712158203125,1.67119538784027099609375,0.547078311443328857421875,0.376218289136886596679688,0.419011145830154418945312,-1.7954337596893310546875,-0.860427796840667724609375,-0.753439426422119140625,0.64607346057891845703125,-0.378301888704299926757812,1.49063789844512939453125,-0.488404929637908935546875,0.104250900447368621826172,0.499690681695938110351562,2.4234268665313720703125,0.198605105280876159667969,-0.244388267397880554199219,-1.049503803253173828125,-0.935452401638031005859375,1.998041629791259765625,-0.647752463817596435546875,0.339501410722732543945312,-0.3617174625396728515625,-1.519773960113525390625,-0.324550330638885498046875,0.179436847567558288574219,0.246584862470626831054688,-1.08241879940032958984375,0.698219358921051025390625,1.49680435657501220703125,-1.21235764026641845703125,0.418997794389724731445312,-0.700957596302032470703125,2.5349462032318115234375,-1.86044514179229736328125,0.330117672681808471679688,-0.71672880649566650390625,-0.9396822452545166015625,0.112770073115825653076172,-0.223858416080474853515625,0.554912865161895751953125,-0.689959049224853515625,-0.72838866710662841796875,0.09484016895294189453125,-0.596654117107391357421875,-0.115737505257129669189453,-0.712011992931365966796875,-0.272707730531692504882812,1.25291538238525390625,0.127606242895126342773438,-0.711893737316131591796875,0.824081718921661376953125,-0.07878339290618896484375,0.936111509799957275390625,-1.43246471881866455078125,1.63483715057373046875,0.461684733629226684570312,-0.0475227758288383483886719,-0.5801665782928466796875,-1.6712052822113037109375,1.00277245044708251953125,0.509774029254913330078125,0.90476143360137939453125,-0.549016296863555908203125,-0.903209686279296875,1.6937129497528076171875,-1.2608797550201416015625,1.02614009380340576171875,0.209235459566116333007812,-0.513391792774200439453125,2.30023288726806640625,-2.069538593292236328125,-0.804360330104827880859375,-0.61548554897308349609375,-0.5831940174102783203125,-0.810069143772125244140625,-0.0569236949086189270019531,0.408800989389419555664062,0.90578734874725341796875,-0.879000723361968994140625,1.24323618412017822265625,-1.7766802310943603515625,-0.5604593753814697265625,1.47255611419677734375,-0.59111309051513671875,1.08959114551544189453125,-0.355161398649215698242188,0.4897000789642333984375,0.7228183746337890625,-0.812104880809783935546875,0.217409417033195495605469,-1.5326135158538818359375,-0.906591892242431640625,-0.176589339971542358398438,-0.0719206184148788452148438,-0.0254414901137351989746094,-0.442719250917434692382812,-0.763177692890167236328125,0.64226353168487548828125,1.5975551605224609375,-0.6203315258026123046875,-0.686018645763397216796875,0.547386467456817626953125,-0.4617311954498291015625,0.198553055524826049804688,-1.2532827854156494140625,0.629943192005157470703125,0.7315037250518798828125,0.409614533185958862304688,0.0871774405241012573242188,0.0200172550976276397705078,-0.466802626848220825195312,-0.949900925159454345703125,-0.317423254251480102539062,0.5858027935028076171875,0.0375133641064167022705078,1.03810322284698486328125,-0.135187178850173950195312,-0.0119396168738603591918945,-0.59028112888336181640625,-0.0979252159595489501953125,-0.5530736446380615234375,-0.322926938533782958984375,0.301013439893722534179688,-0.533519744873046875,-0.674196064472198486328125,0.805442750453948974609375,-1.46278095245361328125,-0.954712092876434326171875,-1.21316254138946533203125,-0.253958970308303833007812,-0.293876916170120239257812,-0.343765825033187866210938,-1.24845778942108154296875,0.148692056536674499511719,-0.275208562612533569335938,-0.258315056562423706054688,0.234748780727386474609375,1.37230098247528076171875,-0.445996791124343872070312,1.08106911182403564453125,2.073940753936767578125,-1.28632843494415283203125,-1.30119335651397705078125,1.1503007411956787109375,0.95803034305572509765625,0.680487096309661865234375,0.668949425220489501953125,-0.428171455860137939453125,0.225304380059242248535156,-0.512419760227203369140625,-1.19121897220611572265625,-0.286578655242919921875,0.4334304332733154296875,0.543933689594268798828125,-0.0277220830321311950683594,-1.6267259120941162109375,-0.90985310077667236328125,0.526708900928497314453125,0.19334125518798828125,-0.49822127819061279296875,-0.176819577813148498535156,1.60449612140655517578125,0.0310612171888351440429688,-1.02903568744659423828125,-1.21856021881103515625,-1.16346204280853271484375,-0.69561803340911865234375,-1.09210026264190673828125,1.7370007038116455078125,0.727173328399658203125,0.107458449900150299072266,-0.24290263652801513671875,-0.8829362392425537109375,1.85901463031768798828125,-0.160267755389213562011719,-0.54700863361358642578125,-0.634297847747802734375,-0.310263931751251220703125,1.66168439388275146484375,1.0476562976837158203125,-0.216911107301712036132812,0.526469647884368896484375,1.02884197235107421875,-0.6731755733489990234375,-1.79217433929443359375,0.838463306427001953125,-1.71555531024932861328125,0.0544752106070518493652344,-1.1194946765899658203125,0.970285594463348388671875,0.0866380631923675537109375,0.495437443256378173828125,2.01727581024169921875,0.5788104534149169921875,0.65519106388092041015625,0.106228493154048919677734,-1.09012115001678466796875,-0.0387823171913623809814453};
const float DSP_ALIGNED(16) b[] = {0.00239783083088696002960205,0.00717453286051750183105469,-0.0582481250166893005371094,-0.0425337292253971099853516,-0.0308496784418821334838867,-0.0111429747194051742553711,-0.0310833211988210678100586,-0.0323281250894069671630859,-0.0391276068985462188720703,-0.0136320600286126136779785,-0.00854117423295974731445312,-0.0443949662148952484130859,0.0178730003535747528076172,-0.0361761748790740966796875,-0.103034742176532745361328,-0.166779175400733947753906,-0.24717175960540771484375,-0.321047991514205932617188,-0.3474528789520263671875,-0.293608635663986206054688,-0.335048139095306396484375,-0.287080258131027221679688,-0.323931515216827392578125,-0.342907965183258056640625,-0.276547908782958984375,-0.279852449893951416015625,-0.23152065277099609375,-0.261411458253860473632812,-0.34313571453094482421875,-0.390839844942092895507812,-0.387347370386123657226562,-0.508739292621612548828125,-0.5366382598876953125,-0.589540541172027587890625,-0.62598001956939697265625,-0.705707728862762451171875,-0.78794825077056884765625,-0.82729828357696533203125,-0.825699031352996826171875,-0.863305985927581787109375,-0.868844568729400634765625,-0.8705303668975830078125,-0.951479434967041015625,-1.0299856662750244140625,-1.0378224849700927734375,-1.1018211841583251953125,-1.149448394775390625,-1.2419109344482421875,-1.3748366832733154296875,-1.38338148593902587890625,-1.44868266582489013671875,-1.57583200931549072265625,-1.68348228931427001953125,-1.71997833251953125,-1.7904303073883056640625,-1.83934783935546875,-1.95415437221527099609375,-2.0698063373565673828125,-2.19092845916748046875,-2.229879856109619140625,-2.209795475006103515625,-2.259418487548828125,-2.3601894378662109375,-2.4434630870819091796875,-2.5057051181793212890625,-2.5975360870361328125,-2.7743675708770751953125,-2.8524286746978759765625,-2.9989240169525146484375,-3.0265781879425048828125,-3.0960748195648193359375,-3.136264324188232421875,-3.2644283771514892578125,-3.4033882617950439453125,-3.477934360504150390625,-3.6142838001251220703125,-3.665204524993896484375,-3.7508704662322998046875,-3.882713794708251953125,-3.9768755435943603515625,-4.04129505157470703125,-4.16065692901611328125,-4.2862834930419921875,-4.294989109039306640625,-4.397524356842041015625,-4.510335445404052734375,-4.566348552703857421875,-4.699834346771240234375,-4.83537960052490234375,-4.849666118621826171875,-4.918969631195068359375,-5.04812526702880859375,-5.075469493865966796875,-5.115299701690673828125,-5.28005504608154296875,-5.38856220245361328125,-5.497127056121826171875,-5.509063243865966796875,-5.506566524505615234375,-5.51924991607666015625,-5.569739818572998046875,-5.60138034820556640625,-5.645751953125,-5.80860233306884765625,-5.886764049530029296875,-5.8720340728759765625,-6.019017696380615234375,-5.991733551025390625,-6.018525600433349609375,-6.02696990966796875,-6.023828983306884765625,-6.03125667572021484375,-5.9822826385498046875,-5.988295078277587890625,-5.998002529144287109375,-6.053358554840087890625,-6.02335643768310546875,-5.9294281005859375,-5.89743137359619140625,-5.922309398651123046875,-5.886503696441650390625,-5.770039081573486328125,-5.732348918914794921875,-5.667415142059326171875,-5.658247470855712890625,-5.587143421173095703125,-5.52980709075927734375,-5.46532917022705078125,-5.38215351104736328125,-5.33815765380859375,-5.181651592254638671875,-5.118036746978759765625,-5.093544483184814453125,-5.0658969879150390625,-5.01296329498291015625,-4.9196624755859375,-4.91128635406494140625,-4.833615779876708984375,-4.8351917266845703125,-4.77650737762451171875,-4.753058910369873046875,-4.619467258453369140625,-4.420931339263916015625,-4.327665805816650390625,-4.257335662841796875,-4.135934352874755859375,-4.209192752838134765625,-4.263696193695068359375,-4.19061183929443359375,-4.287714481353759765625,-4.22205066680908203125,-4.18721866607666015625,-4.2794666290283203125,-4.297712802886962890625,-4.3268337249755859375,-4.2678623199462890625,-4.20109844207763671875,-4.1397571563720703125,-4.151798725128173828125,-4.04967498779296875,-4.1443195343017578125,-4.159832000732421875,-4.152536869049072265625,-4.2219219207763671875,-4.22336292266845703125,-4.30291652679443359375,-4.4372348785400390625,-4.414284229278564453125,-4.451569080352783203125,-4.47533321380615234375,-4.428586483001708984375,-4.46660518646240234375,-4.564644336700439453125,-4.54217529296875,-4.575183868408203125,-4.641531467437744140625,-4.60766124725341796875,-4.728331089019775390625,-4.846701145172119140625,-4.78057956695556640625,-4.7304592132568359375,-4.752751827239990234375,-4.748259067535400390625,-4.70615673065185546875,-4.60690975189208984375,-4.62186431884765625,-4.50038909912109375,-4.56376552581787109375,-4.55364513397216796875,-4.50304126739501953125,-4.40753078460693359375,-4.324647426605224609375,-4.18805599212646484375,-4.018436908721923828125,-3.773965358734130859375,-3.657213687896728515625,-3.5072209835052490234375,-3.4427335262298583984375,-3.3137218952178955078125,-3.15463733673095703125,-2.9663527011871337890625,-2.8070938587188720703125,-2.5792896747589111328125,-2.3328111171722412109375,-2.2289307117462158203125,-1.98834526538848876953125,-1.68155443668365478515625,-1.41685831546783447265625,-1.21214568614959716796875,-0.900089204311370849609375,-0.705209195613861083984375,-0.487676709890365600585938,-0.199230715632438659667969,0.0437660142779350280761719,0.32668507099151611328125,0.558542668819427490234375,0.89321124553680419921875,1.06389248371124267578125,1.3232333660125732421875,1.6058223247528076171875,1.77407753467559814453125,2.0209386348724365234375,2.2712843418121337890625,2.49525928497314453125,2.702161312103271484375,2.838309764862060546875,2.9352829456329345703125,3.111152172088623046875,3.2651636600494384765625,3.4313266277313232421875,3.6158349514007568359375,3.9727270603179931640625,4.24067401885986328125,4.41403961181640625,4.680138111114501953125,4.818204402923583984375,4.975018024444580078125,5.133809566497802734375,5.28495883941650390625,5.526909351348876953125,5.63459110260009765625,5.85857868194580078125,6.136124134063720703125,6.419674396514892578125,6.7207279205322265625,6.849533557891845703125,7.1029148101806640625,7.375089168548583984375,7.60822296142578125,7.787208080291748046875,7.998150348663330078125,8.233539581298828125,8.52910900115966796875,8.79923915863037109375,9.030979156494140625,9.1797809600830078125,9.39701747894287109375,9.68390369415283203125,9.914020538330078125,10.19262981414794921875,10.50371551513671875,10.771026611328125,11.041118621826171875,11.25802326202392578125,11.53898715972900390625,11.7535552978515625,12.00365352630615234375,12.247913360595703125,12.42538166046142578125,12.6962642669677734375,12.865901947021484375,13.01981449127197265625,13.30826854705810546875,13.49969387054443359375,13.74952983856201171875,13.903530120849609375,14.03516292572021484375,14.20637416839599609375,14.2985248565673828125,14.4238719940185546875,14.52974987030029296875,14.6718082427978515625,14.710750579833984375,14.7624988555908203125,14.86634063720703125,14.89673900604248046875,14.88298130035400390625,14.8949260711669921875,14.96703052520751953125,15.02258205413818359375,15.0004520416259765625,15.0060329437255859375,15.05814838409423828125,15.0649471282958984375,15.007579803466796875,14.7877826690673828125,14.63052654266357421875,14.43740940093994140625,14.3152980804443359375,14.269927978515625,14.15223979949951171875,13.93277454376220703125,13.78590679168701171875,13.6925258636474609375,13.4714488983154296875,13.23359775543212890625,13.07585906982421875,12.7202892303466796875,12.42542362213134765625,12.1288127899169921875,11.90855503082275390625,11.587909698486328125,11.257076263427734375,10.99163913726806640625,10.627483367919921875,10.39928722381591796875,10.0192546844482421875,9.68810176849365234375,9.3329830169677734375,9.04935741424560546875,8.59936809539794921875,8.15506839752197265625,7.6728668212890625,7.278873920440673828125,6.981403350830078125,6.565240383148193359375,6.082672595977783203125,5.571167469024658203125,5.142333507537841796875,4.79668712615966796875,4.288706302642822265625,3.9011936187744140625,3.5028245449066162109375,3.0741670131683349609375,2.6829612255096435546875,2.26052379608154296875,1.875864505767822265625,1.46055710315704345703125,1.28931438922882080078125,0.8540513515472412109375,0.457315534353256225585938,0.163828715682029724121094,-0.204932272434234619140625,-0.410027295351028442382812,-0.755281269550323486328125,-1.0421679019927978515625,-1.34764766693115234375,-1.47118604183197021484375,-1.6257832050323486328125,-1.877814769744873046875,-1.8548538684844970703125,-1.972003459930419921875,-2.12985992431640625,-2.26281642913818359375,-2.2925455570220947265625,-2.441722869873046875,-2.5919568538665771484375,-2.6515960693359375,-2.7548353672027587890625,-2.9199116230010986328125,-3.003085613250732421875,-3.174626827239990234375,-3.2012135982513427734375,-3.2546274662017822265625,-3.2282874584197998046875,-3.2439725399017333984375,-3.2450807094573974609375,-3.349015712738037109375,-3.345554351806640625,-3.3953969478607177734375,-3.4733486175537109375,-3.5175058841705322265625,-3.679091930389404296875,-3.661607265472412109375,-3.6703479290008544921875,-3.709945201873779296875,-3.7105972766876220703125,-3.7514438629150390625,-3.6151790618896484375,-3.5776011943817138671875,-3.5446784496307373046875,-3.563823699951171875,-3.5105512142181396484375,-3.3562705516815185546875,-3.370018482208251953125,-3.2620775699615478515625,-3.1598412990570068359375,-3.140606403350830078125,-3.147504329681396484375,-3.0425751209259033203125,-2.932240962982177734375,-2.8587019443511962890625,-2.7626106739044189453125,-2.687008380889892578125,-2.6491641998291015625,-2.5213673114776611328125,-2.460085391998291015625,-2.4544789791107177734375,-2.4545829296112060546875,-2.2963047027587890625,-2.2845942974090576171875,-2.262281894683837890625,-2.0796263217926025390625,-1.94872868061065673828125,-1.777387142181396484375,-1.59454119205474853515625,-1.442134380340576171875,-1.234769344329833984375,-1.015135288238525390625,-0.8858134746551513671875,-0.710691869258880615234375,-0.57916164398193359375,-0.427132129669189453125,-0.277617067098617553710938,-0.0667633563280105590820312,0.103124365210533142089844,0.225989237427711486816406,0.400469601154327392578125,0.478051602840423583984375,0.734089791774749755859375,0.883211195468902587890625,1.01329648494720458984375,1.24866402149200439453125,1.38184463977813720703125,1.5062644481658935546875,1.64830553531646728515625,1.847003459930419921875,1.97611105442047119140625,2.114157199859619140625,2.264933109283447265625,2.3649919033050537109375,2.5162565708160400390625,2.6528289318084716796875,2.863860607147216796875,2.9555270671844482421875,3.0468447208404541015625,3.178963184356689453125,3.2271835803985595703125,3.2947299480438232421875,3.3411426544189453125,3.384624481201171875,3.52624416351318359375,3.5726106166839599609375,3.6521284580230712890625,3.68140316009521484375,3.7457120418548583984375,3.7623636722564697265625,3.7272183895111083984375,3.870553493499755859375,3.8985068798065185546875,3.992977142333984375,4.033703327178955078125,3.9406197071075439453125,3.8761913776397705078125,3.9972569942474365234375,3.9952538013458251953125,4.009756565093994140625,3.9038412570953369140625,3.795699596405029296875,3.6330735683441162109375,3.5918314456939697265625,3.4113485813140869140625,3.243113994598388671875,3.0924308300018310546875,2.947103023529052734375,2.8502581119537353515625,2.563086986541748046875,2.550525188446044921875,2.4480555057525634765625,2.3478152751922607421875,2.1451704502105712890625,1.94185101985931396484375,1.80995047092437744140625,1.69612133502960205078125,1.57553517818450927734375,1.34425055980682373046875,1.22862708568572998046875,1.09736406803131103515625,0.84418404102325439453125,0.7364032268524169921875,0.629222929477691650390625,0.529447257518768310546875,0.316341876983642578125,0.268953949213027954101562,0.311587661504745483398438,0.235802263021469116210938,0.253029733896255493164062,0.245717659592628479003906,0.0882315188646316528320312,0.156999617815017700195312,0.156569987535476684570312,0.102689728140830993652344,0.0543948337435722351074219,0.0799423232674598693847656,0.131875142455101013183594,0.202099591493606567382812,0.291973620653152465820312,0.369668692350387573242188,0.435672432184219360351562,0.461997121572494506835938,0.68405997753143310546875,0.750737011432647705078125,0.768964111804962158203125,0.891269385814666748046875,0.95427739620208740234375,0.977006614208221435546875,0.97761714458465576171875,1.0735623836517333984375,1.16310656070709228515625,1.2358667850494384765625,1.34320294857025146484375,1.5411703586578369140625,1.6160418987274169921875,1.6071364879608154296875,1.595484256744384765625,1.70191276073455810546875,1.7651989459991455078125,1.8158900737762451171875,1.86982095241546630859375,1.93272578716278076171875,2.1269664764404296875,2.1916215419769287109375,2.3945553302764892578125,2.4098985195159912109375,2.5983436107635498046875,2.631931304931640625,2.84923839569091796875,2.9096548557281494140625,2.9746320247650146484375,3.0185222625732421875,2.9528796672821044921875,2.9518597126007080078125,2.8972041606903076171875,2.89022731781005859375,2.863980770111083984375,2.7777233123779296875,2.70670413970947265625,2.64914798736572265625,2.665391445159912109375,2.7591993808746337890625,2.7103271484375,2.680710315704345703125,2.7429349422454833984375,2.7538220882415771484375,2.812154293060302734375,2.7506701946258544921875,2.794276714324951171875,2.7005465030670166015625,2.6000072956085205078125,2.59671878814697265625,2.505824565887451171875,2.6275436878204345703125,2.6825544834136962890625,2.7779958248138427734375,2.7148125171661376953125,2.70898151397705078125,2.750241756439208984375,2.840234279632568359375,3.0014674663543701171875,3.0473678112030029296875,3.105657100677490234375,3.154555797576904296875,3.30366230010986328125,3.3769624233245849609375,3.391337871551513671875,3.52264404296875,3.6675798892974853515625,3.7885515689849853515625,4.013123035430908203125,4.101603984832763671875,4.217342376708984375,4.287559032440185546875,4.500516414642333984375,4.6016330718994140625,4.820032596588134765625,5.010583400726318359375,5.02941417694091796875,5.09559726715087890625,5.1584987640380859375,5.28284358978271484375,5.5367679595947265625,5.66422176361083984375,5.776619434356689453125,5.902129650115966796875,6.03627300262451171875,6.238723278045654296875,6.319018840789794921875,6.36372280120849609375,6.438035488128662109375,6.600122928619384765625,6.787759304046630859375,6.932974338531494140625,7.051478862762451171875,7.08207225799560546875,7.216274738311767578125,7.173069000244140625,7.244200229644775390625,7.3043155670166015625,7.477813720703125,7.449004650115966796875,7.517482757568359375,7.55189418792724609375,7.530874729156494140625,7.50538730621337890625,7.538930416107177734375,7.571628570556640625,7.492239475250244140625,7.440616607666015625,7.455789089202880859375,7.402926921844482421875,7.409030437469482421875,7.35137176513671875,7.291942596435546875,7.29483509063720703125,7.26862335205078125,7.264954090118408203125,7.38771724700927734375,7.28196048736572265625,7.23920726776123046875,7.250075817108154296875,7.18505191802978515625,7.146703243255615234375,6.9901676177978515625,6.9636211395263671875,6.877956390380859375,6.773213863372802734375,6.795745849609375,6.817210674285888671875,6.52048397064208984375,6.49257659912109375,6.455356121063232421875,6.288844585418701171875,6.2287120819091796875,6.1479663848876953125,5.993454456329345703125,5.901935100555419921875,5.739717006683349609375,5.57741069793701171875,5.410944461822509765625,5.15093135833740234375,5.017029285430908203125,4.818997859954833984375,4.67087459564208984375,4.45847034454345703125,4.31334209442138671875,4.064518451690673828125,3.8412322998046875,3.6779711246490478515625,3.3302676677703857421875,3.10243892669677734375,2.771828174591064453125,2.498785495758056640625,2.0533220767974853515625,1.87311708927154541015625,1.54075396060943603515625,1.3412630558013916015625,1.0737125873565673828125,0.901014745235443115234375,0.68607151508331298828125,0.43464267253875732421875,0.125948697328567504882812,-0.164374887943267822265625,-0.360172361135482788085938,-0.58443176746368408203125,-0.778503715991973876953125,-0.953663885593414306640625,-1.215478420257568359375,-1.53599178791046142578125,-1.71806085109710693359375,-1.9414937496185302734375,-2.1828479766845703125,-2.4099099636077880859375,-2.5585544109344482421875,-2.751184940338134765625,-2.9459209442138671875,-3.0752952098846435546875,-3.17699909210205078125,-3.2917921543121337890625,-3.3461246490478515625,-3.4733564853668212890625,-3.5938198566436767578125,-3.777605533599853515625,-3.919640064239501953125,-3.9954288005828857421875,-4.11267948150634765625,-4.2891845703125,-4.495395660400390625,-4.553544521331787109375,-4.581187725067138671875,-4.570903301239013671875,-4.67391204833984375,-4.6224994659423828125,-4.70093059539794921875,-4.725360870361328125,-4.843109130859375,-4.90888690948486328125,-4.93851566314697265625,-4.91961765289306640625,-4.901513576507568359375,-4.84463405609130859375,-4.901443958282470703125,-4.846025943756103515625,-4.818081378936767578125,-4.86017608642578125,-4.71806240081787109375,-4.541338443756103515625,-4.40505886077880859375,-4.422212123870849609375,-4.49258136749267578125,-4.3466892242431640625,-4.38442325592041015625,-4.34050655364990234375,-4.308808803558349609375,-4.35244655609130859375,-4.217769622802734375,-4.128561496734619140625,-4.02456951141357421875,-4.0079441070556640625,-4.058324337005615234375,-4.016918659210205078125,-3.915745258331298828125,-3.8830912113189697265625,-3.7763597965240478515625,-3.633532047271728515625,-3.5672271251678466796875,-3.4751350879669189453125,-3.40922451019287109375,-3.2219178676605224609375,-3.14140224456787109375,-3.0678255558013916015625,-3.0584294795989990234375,-2.9953327178955078125,-2.971729755401611328125,-2.9341580867767333984375,-2.7572681903839111328125,-2.7191574573516845703125,-2.64439678192138671875,-2.591419219970703125,-2.522085666656494140625,-2.5177476406097412109375,-2.4103696346282958984375,-2.4420261383056640625,-2.4122788906097412109375,-2.4309022426605224609375,-2.488894939422607421875,-2.434151172637939453125,-2.455408573150634765625,-2.4853017330169677734375,-2.43695926666259765625,-2.4684545993804931640625,-2.47064685821533203125,-2.529024600982666015625,-2.559999942779541015625,-2.5750100612640380859375,-2.5966949462890625,-2.5813224315643310546875,-2.452606201171875,-2.4645750522613525390625,-2.484061717987060546875,-2.4631097316741943359375,-2.551158905029296875,-2.590648174285888671875,-2.7029387950897216796875,-2.7471411228179931640625,-2.750412464141845703125,-2.754111766815185546875,-2.7830753326416015625,-2.855232715606689453125,-2.8296375274658203125,-2.8872945308685302734375,-2.91501331329345703125,-2.990621089935302734375,-3.0655524730682373046875,-3.100403308868408203125,-3.108189105987548828125,-3.1620624065399169921875,-3.24412250518798828125,-3.295958042144775390625,-3.1541271209716796875,-3.0829164981842041015625,-3.0081493854522705078125,-3.08394908905029296875,-3.1128046512603759765625,-3.1664497852325439453125,-3.1651327610015869140625,-3.2048513889312744140625,-3.0647556781768798828125,-2.99073886871337890625,-2.8574445247650146484375,-2.8739340305328369140625,-2.8225247859954833984375,-2.7008297443389892578125,-2.5967247486114501953125,-2.5472371578216552734375,-2.435753345489501953125,-2.394834995269775390625,-2.3573124408721923828125,-2.26853084564208984375,-2.143762111663818359375,-1.98703086376190185546875,-1.9192979335784912109375,-1.7414467334747314453125,-1.64986860752105712890625,-1.465852260589599609375,-1.26906478404998779296875,-1.03096449375152587890625,-0.867995798587799072265625,-0.762636721134185791015625,-0.577075541019439697265625,-0.445692092180252075195312,-0.249096527695655822753906,-0.0441787652671337127685547,0.2335212230682373046875,0.47103035449981689453125,0.6875019073486328125,0.955197751522064208984375,1.207355499267578125,1.3761351108551025390625,1.68599045276641845703125,1.89610898494720458984375,2.216222286224365234375,2.4855120182037353515625,2.761230945587158203125,3.06350994110107421875,3.310178279876708984375,3.584305286407470703125,3.9411945343017578125,4.203388214111328125,4.52619266510009765625,4.814176082611083984375,4.985047817230224609375,5.25624179840087890625,5.43364715576171875,5.686421871185302734375,5.8851985931396484375,6.23292064666748046875,6.483352184295654296875,6.7032718658447265625,6.98105525970458984375,7.3380126953125,7.55206012725830078125,7.808776378631591796875,7.974840641021728515625,8.16873645782470703125,8.37794208526611328125,8.54196071624755859375,8.73404979705810546875,8.87904262542724609375,8.92525577545166015625,9.101779937744140625,9.18584346771240234375,9.28001117706298828125,9.3570384979248046875,9.44022655487060546875,9.56975078582763671875,9.612178802490234375,9.67903995513916015625,9.71234989166259765625,9.994075775146484375,9.9843597412109375,9.99759387969970703125,10.01922321319580078125,9.95692157745361328125,9.995166778564453125,9.94978237152099609375,9.959865570068359375,9.8791980743408203125,9.819286346435546875,9.6706905364990234375,9.580291748046875,9.451171875,9.3629360198974609375,9.27886676788330078125,9.252231597900390625,9.178531646728515625,9.05523014068603515625,8.956615447998046875,8.828765869140625,8.79287052154541015625,8.58513545989990234375,8.5071125030517578125,8.38834667205810546875,8.1330165863037109375,7.879949092864990234375,7.603836536407470703125,7.42114353179931640625,7.261099338531494140625,7.150340557098388671875,6.954166889190673828125,6.756317138671875,6.69738101959228515625,6.34912395477294921875,6.161197662353515625,5.969880580902099609375,5.71900463104248046875,5.62503814697265625,5.31084537506103515625,5.10941982269287109375,4.854598522186279296875,4.64095592498779296875,4.413861751556396484375,4.19438076019287109375,3.9409258365631103515625,3.7249987125396728515625,3.5169646739959716796875,3.3670132160186767578125,2.9515373706817626953125,2.66510772705078125,2.529223918914794921875,2.3134505748748779296875,2.1561682224273681640625,1.9414021968841552734375,1.7950809001922607421875,1.63496077060699462890625,1.29765605926513671875,1.09305799007415771484375,0.818440377712249755859375,0.674167096614837646484375,0.446444422006607055664062,0.192628726363182067871094,-0.00847516767680644989013672,-0.155506700277328491210938,-0.352696985006332397460938,-0.409791767597198486328125,-0.444104850292205810546875,-0.565986096858978271484375,-0.786957800388336181640625,-0.90839946269989013671875,-1.0318090915679931640625,-1.15888118743896484375,-1.2365186214447021484375,-1.36209952831268310546875,-1.5040740966796875,-1.65090382099151611328125,-1.72715532779693603515625,-1.746788501739501953125,-1.83662593364715576171875,-1.8720138072967529296875,-1.94266355037689208984375,-2.0162222385406494140625,-2.129585742950439453125,-2.122127056121826171875,-2.16652965545654296875,-2.3030757904052734375,-2.4116222858428955078125,-2.469295024871826171875,-2.577553272247314453125,-2.61004161834716796875,-2.6602461338043212890625,-2.7644670009613037109375,-2.8550431728363037109375,-2.847391605377197265625,-2.99230289459228515625,-3.1058528423309326171875,-3.284904003143310546875,-3.37237548828125,-3.455219745635986328125,-3.5439555644989013671875,-3.583847522735595703125,-3.61365985870361328125,-3.672406673431396484375,-3.795047760009765625,-3.8524792194366455078125,-3.938091754913330078125,-4.01436138153076171875,-4.05078983306884765625,-4.054259777069091796875,-4.28287506103515625,-4.416075229644775390625,-4.424606800079345703125,-4.405982494354248046875,-4.405975341796875,-4.530209064483642578125,-4.58305263519287109375,-4.6514873504638671875,-4.7218017578125,-4.77814960479736328125,-4.853497982025146484375,-4.918241024017333984375,-4.976692676544189453125,-5.000841617584228515625,-5.175752162933349609375,-5.35337066650390625,-5.347913265228271484375,-5.427272319793701171875,-5.487192630767822265625,-5.6707000732421875,-5.576690673828125,-5.64521503448486328125,-5.7143955230712890625,-5.787491321563720703125,-5.908282756805419921875,-5.99518871307373046875,-6.13424205780029296875,-6.090853214263916015625,-6.084833621978759765625,-6.138131618499755859375,-6.173987865447998046875,-6.259080410003662109375,-6.193245410919189453125,-6.229265689849853515625,-6.343975067138671875,-6.408359527587890625,-6.420835018157958984375,-6.4068241119384765625,-6.368210315704345703125,-6.421297550201416015625,-6.333339691162109375,-6.349108219146728515625,-6.377728939056396484375,-6.432759761810302734375,-6.347835063934326171875,-6.329243183135986328125,-6.3507480621337890625,-6.39700412750244140625,-6.3624362945556640625,-6.29626560211181640625,-6.19477748870849609375,-6.1294803619384765625,-5.98697566986083984375,-5.9349460601806640625,-5.862438201904296875,-5.80920886993408203125,-5.828031063079833984375};

execution_timer et;
#ifdef NDEBUG
static const int iter_count = 3000;
#else
static const int iter_count = 10;
#endif

void simd_test::test_mulv()
{
	std::string t(32, ' ');
	size_t n = t.size() * 32;
	float DSP_ALIGNED(16) outs[N], outv[N];
	et.start("mulv");
	for (int i = 0; i < iter_count; ++i)
		dsp::mul(outv, a, b, n);

	et.next("mulv simd");
	for (int i = 0; i < iter_count; ++i)
		dsp::simd::mul(outs, a, b, n);
	et.stop();

	float err = dsp::norm_inf<dsp::norm_rel>(outs, outv, N);
	printf("mulv err:\t%f\n", err);
	CPPUNIT_ASSERT(err < 1e-6);
}

void simd_test::test_muls()
{
	float DSP_ALIGNED(16) outs[N], outv[N];
	std::string t(32, ' ');
	size_t n = t.size() * 32;
	float x[] = {0.00126567f};
	et.start("muls");
	for (int i = 0; i < iter_count; ++i)
		dsp::mul(outv, a, *x, n);

	et.next("muls simd");

	for (int i = 0; i < iter_count; ++i)
		dsp::simd::mul(outs, a, *x, n);
	et.stop();

	float err = dsp::norm_inf<dsp::norm_rel>(outs, outv, N);
	printf("muls err:\t%f\n", err);
	CPPUNIT_ASSERT(err < 1e-6);
}

void simd_test::test_mulc()
{
	float DSP_ALIGNED(16) outs[N], outv[N];
	std::string t(32, ' ');
	size_t n = t.size() * 16;
	et.start("mulc");
	for (int i = 0; i < iter_count; ++i)
		dsp::mul(reinterpret_cast<std::complex<float>*>(outv), reinterpret_cast<const std::complex<float>*>(a),
				reinterpret_cast<const std::complex<float>*>(b), n);

	et.next("mulc simd");
	for (int i = 0; i < iter_count; ++i)
		dsp::simd::mul(reinterpret_cast<std::complex<float>*>(outs), reinterpret_cast<const std::complex<float>*>(a),
				reinterpret_cast<const std::complex<float>*>(b), n);
	et.stop();

	float err = dsp::norm_inf<dsp::norm_rel>(outs, outv, N);
	printf("mulc err:\t%f\n", err);
	CPPUNIT_ASSERT(err < 1e-5);
}

void simd_test::test_divv()
{
	float DSP_ALIGNED(16) outs[N], outv[N];
	std::string t(32, ' ');
	size_t n = t.size() * 32;
	et.start("divv");
	for (int i = 0; i < iter_count; ++i)
		dsp::div(outv, a, b, n);

	et.next("divv simd");
	for (int i = 0; i < iter_count; ++i)
		dsp::simd::div(outs, a, b, n);

	et.stop();
	float err = dsp::norm_inf<dsp::norm_rel>(outs, outv, N);
	printf("divv err:\t%f\n", err);
	CPPUNIT_ASSERT(err < 1e-6);
}

void simd_test::test_divs()
{
	float DSP_ALIGNED(16) outs[N], outv[N];
	std::string t(32, ' ');
	size_t n = t.size() * 32;
	float x[] = {0.00126567f};
	et.start("divs");
	for (int i = 0; i < iter_count; ++i)
		dsp::div(outv, a, *x, n);

	et.next("divs simd");

	for (int i = 0; i < iter_count; ++i)
		dsp::simd::div(outs, a, *x, n);
	et.stop();

	float err = dsp::norm_inf<dsp::norm_rel>(outs, outv, N);
	printf("divs err:\t%f\n", err);
	CPPUNIT_ASSERT(err < 1e-6);
}

void simd_test::test_addv()
{
	float DSP_ALIGNED(16) outs[N], outv[N];
	std::string t(32, ' ');
	size_t n = t.size() * 32;
	et.start("addv");
	for (int i = 0; i < iter_count; ++i)
		dsp::add(outv, a, b, n);

	et.next("addv simd");
	for (int i = 0; i < iter_count; ++i)
		dsp::simd::add(outs, a, b, n);

	et.stop();
	CPPUNIT_ASSERT(std::equal(outs, outs + N, outv));
}

void simd_test::test_adds()
{
	float DSP_ALIGNED(16) outs[N], outv[N];
	std::string t(32, ' ');
	size_t n = t.size() * 32;
	float x[] = {0.00126567f};
	et.start("adds");
	for (int i = 0; i < iter_count; ++i)
		dsp::add(outv, a, *x, n);

	et.next("adds simd");

	for (int i = 0; i < iter_count; ++i)
		dsp::simd::add(outs, a, *x, n);
	et.stop();
	CPPUNIT_ASSERT(std::equal(outs, outs + N, outv));
}

void simd_test::test_subv()
{
	float DSP_ALIGNED(16) outs[N], outv[N];
	std::string t(32, ' ');
	size_t n = t.size() * 32;
	et.start("subv");
	for (int i = 0; i < iter_count; ++i)
		dsp::sub(outv, a, b, n);

	et.next("subv simd");
	for (int i = 0; i < iter_count; ++i)
		dsp::simd::sub(outs, a, b, n);

	et.stop();
	CPPUNIT_ASSERT(std::equal(outs, outs + N, outv));
}

void simd_test::test_subs()
{
	float DSP_ALIGNED(16) outs[N], outv[N];
	std::string t(32, ' ');
	size_t n = t.size() * 32;
	float x[] = {0.00126567f};
	et.start("subs");
	for (int i = 0; i < iter_count; ++i)
		dsp::sub(outv, a, *x, n);

	et.next("subs simd");

	for (int i = 0; i < iter_count; ++i)
		dsp::simd::sub(outs, a, *x, n);
	et.stop();

	CPPUNIT_ASSERT(std::equal(outs, outs + N, outv));
}

void simd_test::test_dot()
{
	float outs, outv;
	
	std::string t(32, ' ');
	size_t n = t.size() * 32;
	et.start("dot");
	for (int i = 0; i < iter_count; ++i)
		outv = dsp::dot(a, b, n);

	et.next("dot simd");
	for (int i = 0; i < iter_count; ++i)
		outs = dsp::simd::dot(a, b, n);
	et.stop();

	float err = dsp::norm_inf<dsp::norm_rel>(&outs, &outv, 1);
	printf("dot err:\t%f\n", err);
	CPPUNIT_ASSERT(err < 1e-6);
}

void simd_test::test_dotc()
{
	std::complex<float> outs, outv;
	std::string t(32, ' ');
	size_t n = t.size() * 32;
	et.start("dotc");
	for (int i = 0; i < iter_count; ++i)
		outv = dsp::dot(reinterpret_cast<const std::complex<float>*>(a), reinterpret_cast<const std::complex<float>*>(b), n / 2);

	et.next("dotc simd");
	for (int i = 0; i < iter_count; ++i)
		outs = dsp::simd::dot(reinterpret_cast<const std::complex<float>*>(a), reinterpret_cast<const std::complex<float>*>(b), n / 2);

	et.stop();

	float err = dsp::norm_inf<dsp::norm_rel>(&outs, &outv, 1);
	printf("dotc err:\t%f\n", err);
	CPPUNIT_ASSERT(err < 1e-6);
}

void simd_test::test_sqrt()
{
	float DSP_ALIGNED(16) outs[N], outv[N];
	float DSP_ALIGNED(16) absin[N];
	std::transform(a, a + N, absin, std::abs<float>);

	std::string t(32, ' ');
	size_t n = t.size() * 32;
	et.start("sqrt");
	for (int i = 0; i < iter_count; ++i)
		dsp::sqrt(outv, absin, n);

	et.next("sqrt simd");
	for (int i = 0; i < iter_count; ++i)
		dsp::simd::sqrt(outs, absin, n);

	et.stop();

	float err = dsp::norm_inf<dsp::norm_rel>(outs, outv, N);
	printf("sqrt err:\t%f\n", err);
	CPPUNIT_ASSERT(err < 1e-6);
}

void simd_test::test_recip()
{
	float DSP_ALIGNED(16) outs[N], outv[N];
	std::string t(32, ' ');
	size_t n = t.size() * 32;
	et.start("recip");
	for (int i = 0; i < iter_count; ++i)
		dsp::recip(outv, a, n);

	et.next("recip simd");
	for (int i = 0; i < iter_count; ++i)
		dsp::simd::recip(outs, a, n);

	et.stop();
	float err = dsp::norm_inf<dsp::norm_rel>(outs, outv, N);
	printf("recip err:\t%f\n", err);
	CPPUNIT_ASSERT(err < 1e-3);
}

void simd_test::test_rsqrt()
{
	float DSP_ALIGNED(16) outs[N], outv[N];
	std::string t(32, ' ');
	size_t n = t.size() * 32;
	et.start("rsqrt");
	for (int i = 0; i < iter_count; ++i)
		dsp::rsqrt(outv, a, n);

	et.next("rsqrt simd");
	for (int i = 0; i < iter_count; ++i)
		dsp::simd::rsqrt(outs, a, n);

	et.stop();
	float err = dsp::norm_inf<dsp::norm_rel>(outs, outv, N);
	printf("rsqrt err:\t%f\n", err);
	CPPUNIT_ASSERT(err < 1e-3);
}
